package demo4;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86131
 * Date: 2024-02-13
 * Time: 21:42
 */
public class Dog extends Animal{

    //空参构造
    //带全部参数的构造
    public Dog() {
    }

    public Dog(int age, String color) {
        super(age, color);
    }

    //行为
    //eat(String something)表示吃的东西
    //看家lookHome方法(无参数)

    @Override
    public void eat(String someting) {
        System.out.println(getAge()+"岁的"+getColor()+"颜色的狗两只前腿死死抱住"+someting+"猛吃");
    }

    public void lookHome() {
        System.out.println("狗在看家");
    }
}
